//funcao que cria o vinculo do elemento glade a variavel global
void vincula_objetos()
{
builder = gtk_builder_new(); // cria um descritor para a ponte interface/codigo

gtk_builder_add_from_file( builder, "../ui/principal.glade", NULL );  // indica qual arquivo esta vinculado

entry_nome = GTK_WIDGET( gtk_builder_get_object( builder, "entry_nome" ) );

entry_cod = GTK_WIDGET( gtk_builder_get_object( builder, "entry_cod" ) );

entry_cpf = GTK_WIDGET( gtk_builder_get_object( builder, "entry_cpf" ) );

entry_identidade = GTK_WIDGET( gtk_builder_get_object( builder, "entry_identidade" ) );

entry_dia_nascimento = GTK_WIDGET( gtk_builder_get_object( builder, "entry_dia_nascimento" ) );

entry_mes_nascimento = GTK_WIDGET( gtk_builder_get_object( builder, "entry_mes_nascimento" ) );

entry_ano_nascimento = GTK_WIDGET( gtk_builder_get_object( builder, "entry_ano_nascimento" ) );

entry_endereco = GTK_WIDGET( gtk_builder_get_object( builder, "entry_endereco" ) );

entry_bairro = GTK_WIDGET( gtk_builder_get_object( builder, "entry_bairro" ) );

entry_cidade = GTK_WIDGET( gtk_builder_get_object( builder, "entry_cidade" ) );

entry_cep = GTK_WIDGET( gtk_builder_get_object( builder, "entry_cep" ) );

entry_complemento = GTK_WIDGET( gtk_builder_get_object( builder, "entry_complemento" ) );

entry_telefone_res = GTK_WIDGET( gtk_builder_get_object( builder, "entry_telefone_res" ) );

entry_telefone_cel = GTK_WIDGET( gtk_builder_get_object( builder, "entry_telefone_cel" ) );

entry_telefone_out = GTK_WIDGET( gtk_builder_get_object( builder, "entry_telefone_out" ) );

entry_observacoes = GTK_WIDGET( gtk_builder_get_object( builder, "entry_observacoes" ) );

entry_busca_nome = GTK_WIDGET( gtk_builder_get_object( builder, "entry_busca_nome" ) );

liststore_busc     = GTK_LIST_STORE( gtk_builder_get_object( builder, "liststore_busc" ) );

liststore_doc     = GTK_LIST_STORE( gtk_builder_get_object( builder, "liststore_doc" ) );

notebook = GTK_NOTEBOOK( gtk_builder_get_object( builder, "notebook" ) );

label_encontrados = GTK_LABEL( gtk_builder_get_object( builder, "label_encontrados" ) );

dlg_adicionar_doc = GTK_WIDGET( gtk_builder_get_object( builder, "dlg_adicionar_doc" ) );

window_obs = GTK_WIDGET( gtk_builder_get_object( builder, "window_obs" ) );

dlg_registro_inv = GTK_WIDGET( gtk_builder_get_object( builder, "dlg_registro_inv" ) );

window_scan = GTK_WIDGET( gtk_builder_get_object( builder, "window_scan" ) );

entry_nome_doc = GTK_WIDGET( gtk_builder_get_object( builder, "entry_nome_doc" ) );

entry_cod_doc = GTK_WIDGET( gtk_builder_get_object( builder, "entry_cod_doc" ) );

entry_obs_motivo = GTK_WIDGET( gtk_builder_get_object( builder, "entry_obs_motivo" ) );


 // armazena todos os widgets listados e vincula a uma variavel global
window = GTK_WIDGET( gtk_builder_get_object( builder, "window" ) );
//conecta todos os sinais "callbacks"
gtk_builder_connect_signals( builder, NULL );

}

